package beat

type Dmg struct {
	P    float32
	From int32
	To   int32
	T    int     //Type 1=dmg 2=heal
	Tx   float32 //threat rate
	Pn   float32 //penetrate rate of sponsor //[0,0.4]

	base   float32
	criMul float32 //critical multi index

	resist float32
}

func (d Dmg) IsCritical() bool {
	return d.criMul > 0
}

func (d *Dmg) GetBeared() float32 {
	return d.P - d.resist
}
func (d *Dmg) SetResist(v float32) {
	d.resist = v
}
func (d *Dmg) GetResist() (v float32) {
	return d.resist
}
